<div class="container_12">
	<div class="grid_12">
    	<div class="top-box">Login</div>
        <div class="bottom-box">
        
        <h2><?php echo ucfirst($usertype); ?> Log In</h2>
        
		<?php
			$userAttrib = array('name' => 'username', 'value' => set_value('username'), 'id' => 'username','placeholder'=>'username');
			$passAttrib = array('name' => 'password', 'id' => 'password','placeholder'=>'Password');
			$formAttrib = array('id' => 'login');
			if($usertype == 'administrator')
				$usertype = 'admin';
			$hiddenAttrib = array('usertype' => $usertype);
			
		?>
		<div class="login">
		<?php 	
			echo validation_errors();
			if(isset($validation_result)) echo '<div class="error">'.$validation_result.'</div>';
	
			echo form_open('post/authuser', $formAttrib);
		    echo form_label('Login', 'username');
			echo form_hidden($hiddenAttrib);
			echo form_input($userAttrib);
			echo form_label('Password', 'password');
			echo form_password($passAttrib);
		?>
		     
        <?php  echo form_submit('login', 'Login'); ?>
		
		</div> 
		<a href="<?=site_url('home');?>" class="btn">GO Back Home</a>
        <?php if($usertype == 'student'):?>
        	<a href="<?=site_url('register');?>" class="btn">Register</a>
        <?php endif; ?>
    
    </div>
    </div>
</div>